#include <stdio.h>

/*
Declare function prototypes for each of the four functions
*/
void TestFunct_1(void);
void TestFunct_2(int i);
int TestFunct_3(void);
int TestFunct_4(int x);

int main(int argc, char* argv[])
{
	/* 
	Declare two trivial integer variables. One to pass as a parameter to
	the various function calls, and one to store the value returned from
	any of the function calls.
	*/ 
	int iParam = 77;
	int iRetVal = 0;
	
	// Call the first function, print a blank line after for clarity
	TestFunct_1();
	printf("\n");
	
	// Call the second function, print a blank line after for clarity
	TestFunct_2(iParam);
	printf("\n");
	
	/*
	Call the third fuction, storing the returned integer in an integer variable 
	and print a blank line for clarity.
	*/
	iRetVal = TestFunct_3();
	printf("%d \n", iRetVal);
	printf("\n");
	
	/*
	Call the fourth function, passing in an integer as a parameter and storing the 
	result in another integer variable which is printed to the screen. Then print 
	a blank line for clarity.
	*/
	iRetVal = TestFunct_4(iParam);
	printf("%d \n", iRetVal);
	printf("\n");

	// Return 0 to indicate successful program completion.
      	return 0;
}

/*
	The following functions are self documenting from the point of view of parameters
	and return types as they print the relevant information to the screen.
*/

//version 1
void TestFunct_1(void)
{
	printf("TestFunct_1 takes no paramters.\n");
	printf("TestFunct_1 returns nothing. \n");
}

//version 2
void TestFunct_2(int i)
{
	printf("TestFunct_2 takes an integer as a parameter, in this case: %d. \n", i);
	printf("TestFunct_2 returns nothing.\n");
}

//version 3
int TestFunct_3(void)
{
	printf("TestFunct_3 takes no parameters. \n"); 
        printf("TestFunct_3 returns an integer, in this case: ");
	return 1;
}

//version 4
int TestFunct_4(int x)
{
	printf("TestFunct_2 takes an integer as a parameter, in this case: %d. \n", x);
     	printf("TestFunct_2 returns an integer, in this case: ");
	return x;
}

